﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Navigation;
using Microsoft.Phone.Controls;
using Microsoft.Phone.Shell;
using System.Collections.ObjectModel;

namespace TruyenAudio
{
    public partial class DanhSachTruyen : PhoneApplicationPage
    {

        public DanhSachTruyen()
        {
            InitializeComponent();

        }

        private void lstTruyen_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            Item item = (Item)lstTruyen.SelectedItem;
            ListItem.TenTruyen = item.ProductName;
            ((App)Application.Current).RootFrame.Navigate(new Uri("/TapTruyen.xaml", UriKind.Relative));

        }

        protected override void OnBackKeyPress(System.ComponentModel.CancelEventArgs e)
        {
            //MessageBoxResult kq = MessageBox.Show("Bạn muốn quay lại thể loại truyện ?", "Thông Báo", MessageBoxButton.OKCancel);
            //if (kq == MessageBoxResult.OK)
            //{
            ((App)Application.Current).RootFrame.Navigate(new Uri("/MainPage.xaml", UriKind.Relative));
            //}
            //else
            //{
            //    e.Cancel = true;
            //}
        }

    }
}